home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 November
/
Macworld (1999-11).dmg
/
Updaters
/
WhiteCap 3.0.4
/
WhiteCap Source.sit
/
WhiteCap Source
/
Common
/
General Tools
/
Headers
/
XList.h
< prev
next >
Wrap
Text File
|
1999-07-13
|
2KB
|
59 lines
#pragma once
#include "nodeClass.h"
#include "ListSocket.h"
class XList : protected nodeClass, public ListSocket {
public:
XList( nodeClass* inParent );
// Post: This inserts <inNodeToAdd> within this node, after the current insertion point (ie, at mInsertionPt and mInsertionDepth).
// Note: 0 for a depth means the root level.
// Note: The insertion pt is modified/maintained to follow after <inNodeToAdd> was placed
void DoBestInsert( nodeClass* inNodeToAdd );
// Post: Sets the current insertion point before the node <inInsertPt>.
// Note: If <inInsertPt> is NULL, the insert pt is at the end of the list
void SetInsertPtBefore( nodeClass* inInsertPt );
// *** nodeClass overrides--see nodeClass.h for fcn docs ***
// Post: Same as nodeClass::findSubNode() except that caching brings running time to O(1) (vs. O(n)) if
// the previous call was an adjacent node
virtual nodeClass* findSubNode( long inNodeNum );
// Post: Same as nodeClass::findSubNode() except that caching brings running time to O(1) (vs. O(n)) if
// the previous call was an adjacent node
virtual long findSubNode( nodeClass* inNodePtr );
// Post: Returns the cell number that <inCellNum> is hierarcharaly inside (similar to nodeClass's GetParent()).
// Note: If the specified cell is at the root level (ie it has no real visible parent) then 0 is returned.
// Note: If the specified cell does not exist, -1 is returned.
long GetParent( long inCellNum );
// *** ListSocket overrides--see ListSocket.h for fcn docs ***
virtual bool CheckInsertPt( long& ioNodeNum, long& ioDepth ) { return nodeClass::CheckInsertPt( ioNodeNum, ioDepth ); }
virtual void MoveSelected( long inAboveCell, long inDepth ) { nodeClass::MoveSelected( inAboveCell, inDepth ); }
virtual void DeleteSelected() { nodeClass::DeleteSelected(); }
virtual XLongList* ManageClick( long inCell, bool inShift, bool inCmd, bool inDeselectRest );
virtual void SetSelected( long inElementNum, bool isSelected );
virtual bool IsSelected( long inElementNum );
virtual long NumCells();
protected:
virtual void UpdateCounts( int inShallowChange );
nodeClass* mCachedNode; // NULL if Dirty
long mCachedNodeNum; // Deep instance of mCachedNode
};